package com.fh.service.impl;/**
 * 描述:
 * Author:袁亚强
 * Date:2021/11/2317:23
 */

import com.fh.entity.po.Value;
import com.fh.mappers.ValueMapper;
import com.fh.service.ValueService;
import org.springframework.stereotype.Service;
import sun.dc.pr.PRError;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * created by macro on 2021/11/23,
 */
@Service
public class ValueServiceImpl implements ValueService {
    @Resource
    private ValueMapper valueMapper;

    @Override
    public Value queryByIdData(Integer id) {
        return valueMapper.queryByIdData(id);
    }

    @Override
    public void updateValue(Value value) {
        valueMapper.updateValue(value);
    }

    @Override
    public List<Value> queryByIdValue(Integer id) {
        return valueMapper.queryByIdValue(id);
    }

    @Override
    public void addValue(Value value) {
        value.setIsdel(0);
        value.setCreateDate(new Date());
        valueMapper.addValue(value);
    }
}
